<script>
  import { defineComponent } from '@vue/composition-api';
  import { ConfigProvider } from 'ant-design-vue';
  import dayjs from 'dayjs';
  import zhCN from 'ant-design-vue/es/locale/zh_CN';
  import 'dayjs/locale/zh-cn';
  import Lay from '@/layout';

  const Index = defineComponent({
    components: {
      ConfigProvider,
      Lay,
    },
    setup() {
      // 设置主题样式
      document.querySelector('html').dataset.theme = 'theme1';

      dayjs.locale('zh-cn');

      const locale = zhCN;

      return {
        locale,
      };
    },
  });

  export default Index;
</script>

<template>
  <config-provider :locale="locale">
    <lay />
  </config-provider>
</template>
